package com.csp.base.service;
import com.csp.base.model.JobAndTrigger;
import com.github.pagehelper.PageInfo;

public interface IJobAndTriggerService {
	
	/**
	 * 修改job的状态为停止中
	 * @param jobName
	 * @param jobGroup
	 */
	public void updateJobStatusToStopping(String jobName,String jobGroup);
	
	/**
	 * 修改job的状态为运行中
	 * @param jobName
	 * @param jobGroup
	 */
	public void updateJobStatusToRunning(String jobName,String jobGroup);
	
	/**
	 * 任务列表分页查询 
	 * @param pageNum
	 * @param pageSize
	 * @return
	 */
	public PageInfo<JobAndTrigger> getJobAndTriggerDetails(int pageNum, int pageSize);
	
	/**
	 * 添加定时任务
	 * @param jobName
	 * @param jobClassName
	 * @param jobGroupName
	 * @param cronExpression
	 */
	public void addJob(String jobName, String jobClassName, String jobGroupName, String cronExpression);

	/**
	 * 删除定时任务
	 * @param jobClassName
	 * @param jobGroupName
	 */
	public void jobdelete(String jobClassName, String jobGroupName);

	/**
	 * 修改定时任务我
	 * @param jobName
	 * @param jobGroupName
	 * @param cronExpression
	 */
	public void jobReschedule(String jobName, String jobGroupName, String cronExpression);

	/**
	 * 暂停定时任务
	 * @param jobName
	 * @param jobGroupName
	 */
	public void jobPause(String jobName, String jobGroupName);

	/**
	 * 恢复定时任务
	 * @param jobName
	 * @param jobGroupName
	 */
	public void jobresume(String jobName, String jobGroupName);
}
